<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCopartnerAppliesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('copartner_applies', function (Blueprint $table) {
            $table->increments('id')->comment('主键自增无意义');
            $table->integer('user_id')->comment('申请的用户id');
            $table->string('phone')->nullable()->comment('电话');
            $table->string('idcardnum')->nullable()->comment('身份证号');
            $table->string('shop_name')->nullable()->comment('店铺名称');
            $table->string('shop_address')->nullable()->comment('店铺地址');
            $table->tinyInteger('status')->nullable()->default(0)->comment('申请状态 0-申请中 1-同意申请 2-拒绝申请');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('copartner_applies');
    }
}
